<?php


namespace dsp\chainOfResponsibility;


use dsp\chainOfResponsibility\handler\DogHandler;
use dsp\chainOfResponsibility\handler\MonkeyHandler;
use dsp\chainOfResponsibility\handler\SquirrelHandler;

class Main extends \kernel\BaseMain
{

    public function execute($choice = 'all')
    {
        $monkey = new MonkeyHandler();
        $squirrel = new SquirrelHandler();
        $dog = new DogHandler();

        $monkey->setNext($squirrel)->setNext($dog);

        echo "Chain:: Monkey > Squirrel > Dog" . PHP_EOL . PHP_EOL;
        Client::clientCode($monkey);

        echo "Subchain:: Squirrel > Dog" . PHP_EOL;
        Client::clientCode($squirrel);
    }
}